import { createApp } from 'vue'
import { setupStore } from '@/store'
import { setupRouter } from '@/router'

import './style.css'
import 'virtual:uno.css'    // 确保 UnoCSS 动态生成和注入样式的样式能够全局生效
import App from './App.vue'

// 引入全局样式
import '@/styles/index.less'
import { ElLoading } from 'element-plus'


// createApp(App).mount('#app')

const setupApp = () => {
    const app = createApp(App)
    app.directive("loading", ElLoading.directive)

    setupRouter(app)

    setupStore(app)
    
    app.mount('#app')
}

setupApp()
